package com.qf.day02;

import java.util.Scanner;
/*
会员购物时，根据输入积分的不同享受不同的折扣计算会员购物时获得的折扣输出实付金额会员积分x折扣
    x< 2000 9折
    2000≤x< 4000 8折
    4000≤x< 8000 7折
    x≥8000 6折
 */
public class lianxi {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("您花费的金额为：");
        double money = scanner.nextDouble();
        if(money<2000){
            System.out.println("恭喜您打九折");
            money*=0.9;
            System.out.println("您最终花费金额为："+money);
        }else if (money>=2000&&money<=4000) {
            System.out.println("恭喜您打八折");
            money*=0.8;
            System.out.println("您最终花费金额为："+money);
        }else if (money>=4000&&money<=8000) {
            System.out.println("恭喜您打七折");
            money *= 0.7;
            System.out.println("您最终花费金额为：" + money);
        }else if (money>=8000) {
            System.out.println("恭喜您打六折");
            money *= 0.6;
            System.out.println("您最终花费金额为：" + money);
        }
    }
}
